package textui.example;

import textui.UIElement;
import textui.UIElementBuilder;
import textui.UIRunner;

public class HospitalUI{
	
	public static void main(String[] args) {
		new UIRunner(new HostpitalUIBuilder().build()).run();
	}
	private static class HostpitalUIBuilder implements UIElementBuilder
	{

		@Override
		public UIElement build() {
			MenuBuilder main = new MenuBuilder();
			MenuBuilder L1 = new MenuBuilder();
			MenuBuilder L2 = new MenuBuilder();
			MenuBuilder L3 = new MenuBuilder();
			UIElementBuilder builder = buildexit();
			main.link("L1", L1);
			main.link("L2", L2);
			main.link("L3", L3);
			L1.link("main", main);
			L2.link("main", main);
			L3.link("main", main);
			main.link("exit", builder);
			L1.link("exit", builder);
			L2.link("exit", builder);
			L3.link("exit", builder);
			
			
			return main.build();
		}

		private UIElementBuilder buildexit() {
			return new UIElementBuilder() {
				
				@Override
				public UIElement build() {
					return new UIElement(null) {
						
						@Override
						public UIElement run() {
							return null;
						}
					};
				}
			};
		}
		
	}
	@SuppressWarnings("unused")
	private static UIElement generate() {
		
		return null;
	}
}
